package common

import (
	"crypto/md5"
	"encoding/hex"
)

func EncodeMD5(val string) string {
	data := []byte(val)
	md5New := md5.New()
	md5New.Write(data)
	// hex转字符串
	md5string := hex.EncodeToString(md5New.Sum(nil))
	return md5string
}
